package com.lolprojects.lolcalc.controller;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lolprojects.lolcalc.bean.ChampionInterface;
import com.lolprojects.lolcalc.service.ChampionService;

@Controller
public class X1Controller {

	@Autowired
	private ChampionService championService;
	
	@RequestMapping("/championSelect")
	public String hello(ModelMap model, HttpServletResponse resp) {
		List<ChampionInterface> champList = championService.getAllChampions();
		model.addAttribute("champs", champList);
		return "championSelect";
	}
}
